<template>
	<view class="u-demo">
		<uni-card v-for="(item,index) in yijian" @click="tofan(item.id)"> 
			<view class="u-p-10">标题：{{item.title}}</view>
			<view class="u-p-10">内容：{{fillstr(item.content)}}</view>
		</uni-card>
	</view>
</template>

<script>
	import api from 'commer/apiURL.js'
	export default {
		data() {
			return {
				yijian:[],
				base:api.baseurl,
			}
		},
		onLoad() {
			this.getyijian()
		},
		methods: {
			getyijian(){
				this.$get(this.base+'/prod-api/api/common/feedback/list').then((res)=>{		
					this.yijian = res.rows
				})
			},
			fillstr(str1){
				var str = str1.replace(/<[^>]+>/g,'')
				return str.length >16?str.substring(0,16)+'...':str
			},
			tofan(id){
				uni.navigateTo({
					url:"fankulist?id="+id
				})
			}
		}
	}
</script>

<style>

</style>
